Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Scala3 .tasty files #12529

Closed
wants to merge 1 commit into from

Conversation

timothyklim
Copy link
Contributor

ijar tool support Kotlin modules by not stripped out files in META-INF/*.kotlin_module.
This PR add support for new Scala 3 (and Scala 2.13.4+) TASTy format to have ability to use Scala 3 modules.

@google-cla
Copy link

google-cla bot commented Nov 20, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Nov 20, 2020
@timothyklim
Copy link
Contributor Author

cc @philwo

@Jacke
Copy link

Jacke commented Nov 20, 2020

Hey guys @philwo You should check this MR, it's really important

@timothyklim
Copy link
Contributor Author

cc @alandonovan

@philwo
Copy link
Member

philwo commented Nov 23, 2020

Thank you! This definitely looks like a tasty PR. 😋

I think there are no issues with merging it, the only question is, is this important enough to be cherry-picked into Bazel 4.0 LTS (= will the lack of it be an issue for Scala users going forward?).

@timothyklim
Copy link
Contributor Author

Thank you! This definitely looks like a tasty PR.

I think there are no issues with merging it, the only question is, is this important enough to be cherry-picked into Bazel 4.0 LTS (= will the lack of it be an issue for Scala users going forward?).

I hope that 4.0 will include this patch and I'll continue to work on 3.0 support for rules_scala.

@philwo philwo mentioned this pull request Nov 23, 2020
10 tasks
@alandonovan
Copy link
Contributor

Code change looks fine to me. I didn't realize we still used ijar. I wrote parts of that in grad school nearly 20 years ago!

@jin jin added the team-Rules-Server Issues for serverside rules included with Bazel label Dec 4, 2020
@bazel-io bazel-io closed this in 1489f0f Dec 7, 2020
philwo pushed a commit that referenced this pull request Dec 7, 2020
**ijar** tool support Kotlin modules by [not stripped out](088d8de)  files in `META-INF/*.kotlin_module`.
This PR add support for new Scala 3 (and Scala 2.13.4+) [TASTy](https://dotty.epfl.ch/docs/reference/metaprogramming/toc.html) format to have ability to use Scala 3 modules.

Closes #12529.

PiperOrigin-RevId: 346068234
philwo pushed a commit that referenced this pull request Dec 7, 2020
**ijar** tool support Kotlin modules by [not stripped out](088d8de)  files in `META-INF/*.kotlin_module`.
This PR add support for new Scala 3 (and Scala 2.13.4+) [TASTy](https://dotty.epfl.ch/docs/reference/metaprogramming/toc.html) format to have ability to use Scala 3 modules.

Closes #12529.

PiperOrigin-RevId: 346068234
philwo pushed a commit that referenced this pull request Dec 9, 2020
**ijar** tool support Kotlin modules by [not stripped out](088d8de)  files in `META-INF/*.kotlin_module`.
This PR add support for new Scala 3 (and Scala 2.13.4+) [TASTy](https://dotty.epfl.ch/docs/reference/metaprogramming/toc.html) format to have ability to use Scala 3 modules.

Closes #12529.

PiperOrigin-RevId: 346068234
philwo pushed a commit that referenced this pull request Dec 10, 2020
**ijar** tool support Kotlin modules by [not stripped out](088d8de)  files in `META-INF/*.kotlin_module`.
This PR add support for new Scala 3 (and Scala 2.13.4+) [TASTy](https://dotty.epfl.ch/docs/reference/metaprogramming/toc.html) format to have ability to use Scala 3 modules.

Closes #12529.

PiperOrigin-RevId: 346068234
@timothyklim timothyklim deleted the ijar-scala-tasty branch January 8, 2021 09:55
ulfjack pushed a commit to EngFlow/bazel that referenced this pull request Mar 5, 2021
**ijar** tool support Kotlin modules by [not stripped out](bazelbuild@088d8de)  files in `META-INF/*.kotlin_module`.
This PR add support for new Scala 3 (and Scala 2.13.4+) [TASTy](https://dotty.epfl.ch/docs/reference/metaprogramming/toc.html) format to have ability to use Scala 3 modules.

Closes bazelbuild#12529.

PiperOrigin-RevId: 346068234
copybara-service bot pushed a commit that referenced this pull request Nov 6, 2024
Currently producing `ijar` using Scala 3 produces the following warnings:
```
ijar: skipping unknown attribute: "TASTY".
```

TASTY is a Scala 3 specific ClassFile attribute and informs that for given `.class` file there is also emmited as `.tasty` file (these were handled in #12529). It can be consumed in the same way as currently handled `Scala` and `ScalaSig` attributes.
Handling that should remove redundant warnings

Here's example on how this attribute is emmited:
https://github.com/scala/scala3/blob/91ef92159c628eaeab8311dc82bed7ed4fe03c63/compiler/src/dotty/tools/backend/jvm/CodeGen.scala#L92-L110

Closes #24165.

PiperOrigin-RevId: 693863203
Change-Id: If811be3a725251b9c9db8ac2c92245fa58bdbfc8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes team-Rules-Server Issues for serverside rules included with Bazel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants